/**
* @title:RegExp index属性
* @tag: RegExp.index
* @description: 返回字符位置，它是查找字符串中第一个成功匹配的开始位置。只读
*/
function RegExpTest() {
	var ver = Number(ScriptEngineMajorVersion() + "."
			+ ScriptEngineMinorVersion());
	if (ver >= 5.5) {
		var src = "The rain in Spain falls mainly in the plain.";
		var re = /\w+/g;	
		var arr;
		while ((arr = re.exec(src)) != null)
			log(arr.index + "-" + arr.lastIndex + "\t" + arr);
	} else {
		log("You need a newer version of JScript for this to work");
	}
} 
RegExpTest();

